/*
 * @Descripttion:
 * @Author: jhw
 * @Date: 2024-06-14 15:40:08
 * @LastEditors: jhw
 * @LastEditTime: 2025-04-24 17:47:30
 */
type TableType = 'default' | 'selection' | 'index' | 'slot'; // | 'expand' | 'tag' | 'switch' |

export interface queryParam {
  pageSize: number;
  pageNumber: number;
}

export interface BaseTableColumn<U = true> {
  type: TableType;
  label?: string;
  prop?: (U extends boolean ? string : keyof U) | 'index';
  width?: string;
  [key: string]: any;
}

interface SlotTableColumn extends BaseTableColumn {
  type: 'slot';
  slotName: string;
}

interface DefaultTableColumn<T> extends BaseTableColumn<T> {
  type: Exclude<TableType, 'slot'>;
}

export type TableColumn<U> = SlotTableColumn | DefaultTableColumn<U>;

export interface TableConfig<T = true> {
  columns: TableColumn<T>[];
}
